/* 
 * tables.h
 * Created on July 22, 2005; 4:58 PM
 * by VRamadurai
 */

#ifndef _TABLES_H_
#define _TABLES_H_

#include "HsTypes.h"
#include "iqdma_3500.h"

short twiddle_stage012_total_g[16*3*2] = {
(short)0x0, (short)0x0, (short)0X7FFF, (short)0x0,
(short)0x0, (short)0x0, (short)0X7FFF, (short)0x0,
(short)0x0, (short)0x0, (short)0X7FFF, (short)0x0,
(short)0x0, (short)0x0, (short)0X7FFF, (short)0x0,
(short)0x0, (short)0x0, (short)0X0, (short)0x0,
(short)0x7FFF, (short)0x0, (short)0X0, (short)0XFFFF8000,
(short)0x0, (short)0x0, (short)0X0, (short)0x0,
(short)0x7FFF, (short)0x0, (short)0X0, (short)0XFFFF8000,
(short)0x7FFF, (short)0x0, (short)0x7FFF, (short)0x0, (short)0x7FFF, (short)0x0, (short)0x7FFF, (short)0x0,
(short)0x7FFF, (short)0x0, (short)0x7FFF, (short)0x0, (short)0x7FFF, (short)0x0, (short)0x7FFF, (short)0x0,
(short)0x0, (short)0x0, (short)0x0, (short)0X7FFF,
(short)0x0, (short)0x0, (short)0x0, (short)0X7FFF,
(short)0x0, (short)0x0, (short)0x0, (short)0X7FFF,
(short)0x0, (short)0x0, (short)0x0, (short)0X7FFF,
(short)0x0, (short)0x0, (short)0X0, (short)0x0,
(short)0X0, (short)0XFFFF8000, (short)0x7FFF, (short)0x0,
(short)0x0, (short)0x0, (short)0X0, (short)0x0,
(short)0X0, (short)0XFFFF8000, (short)0x7FFF, (short)0x0,
(short)0X0, (short)0x7FFF, (short)0X0, (short)0x7FFF, (short)0X0, (short)0x7FFF, (short)0X0, (short)0x7FFF,
(short)0X0, (short)0x7FFF, (short)0X0, (short)0x7FFF, (short)0X0, (short)0x7FFF, (short)0X0, (short)0x7FFF
};


hs_int16_t iq_scale_g[32] = {IQ_SHIFT,IQ_SHIFT,IQ_SHIFT,IQ_SHIFT,
                      IQ_SHIFT,IQ_SHIFT,IQ_SHIFT,IQ_SHIFT,
                      IQ_SHIFT,IQ_SHIFT,IQ_SHIFT,IQ_SHIFT,
                      IQ_SHIFT,IQ_SHIFT,IQ_SHIFT,IQ_SHIFT,
		      IQ_SHIFT,IQ_SHIFT,IQ_SHIFT,IQ_SHIFT,
		      IQ_SHIFT,IQ_SHIFT,32,32,
		      32,32,32,32,
		      32,32,32,32
		};
       
hs_int16_t iq_bias_g[32] = {IQ_BIAS,IQ_BIAS,IQ_BIAS,IQ_BIAS,
                     IQ_BIAS,IQ_BIAS,IQ_BIAS,IQ_BIAS,
                     IQ_BIAS,IQ_BIAS,IQ_BIAS,IQ_BIAS,
                     IQ_BIAS,IQ_BIAS,IQ_BIAS,IQ_BIAS,
		     IQ_BIAS,IQ_BIAS,IQ_BIAS,IQ_BIAS,
		     IQ_BIAS,IQ_BIAS,0,0,
	  	     0,0,0,0,
		     0,0,0,0
		};

                     
hs_int16_t asOnesTable_g[4] = {4, 4, 4, 4};

hs_int16_t  asFullRateCckSeqI_g[64*8] =
{
    1,      1,   1,     -1,	1,	1,	-1,	1,
    0,	0,	0,	0,	1,	1,	-1,	1,
    -1,	-1,	-1,	1,	1,	1,	-1,	1,
    0,	0,	0,	0,	1,	1,	-1,	1,

    0,	0,	1,	-1,	0,	0,	-1,	1,
    -1,	-1,	0,	0,	0,	0,	-1,	1,
    0,	0,	-1,	1,	0,	0,	-1,	1,
    1,	1,	0,	0,	0,	0,	-1,	1,

    -1,	-1,	1,	-1,	-1,	-1,	-1,	1,
    0,	0,	0,	0,	-1,	-1,	-1,	1,
    1,	1,	-1,	1,	-1,	-1,	-1,	1,
    0,	0,	0,	0,	-1,	-1,	-1,	1,

    0,	0,	1,	-1,	0,	0,	-1,	1,
    1,	1,	0,	0,	0,	0,	-1,	1,
    0,	0,	-1,	1,	0,	0,	-1,	1,
    -1,	-1,	0,	0,	0,	0,	-1,	1,

    0,	1,	0,	-1,	0,	1,	0,	1,
    -1,	0,	-1,	0,	0,	1,	0,	1,
    0,	-1,	0,	1,	0,	1,	0,	1,
    1,	0,	1,	0,	0,	1,	0,	1,

    -1,	0,	0,	-1,	-1,	0,	0,	1,
    0,	-1,	-1,	0,	-1,	0,	0,	1,
    1,	0,	0,	1,	-1,	0,	0,	1,
    0,	1,	1,	0,	-1,	0,	0,	1,

    0,	-1,	0,	-1,	0,	-1,	0,	1,
    1,	0,	-1,	0,	0,	-1,	0,	1,
    0,	1,	0,	1,	0,	-1,	0,	1,
    -1,	0,	1,	0,	0,	-1,	0,	1,

    1,	0,	0,	-1,	1,	0,	0,	1,
    0,	1,	-1,	0,	1,	0,	0,	1,
    -1,	0,	0,	1,	1,	0,	0,	1,
    0,	-1,	1,	0,	1,	0,	0,	1,

    -1,	1,	-1,	-1,	-1,	1,	1,	1,
    0,	0,	0,	0,	-1,	1,	1,	1,
    1,	-1,	1,	1,	-1,	1,	1,	1,
    0,	0,	0,	0,	-1,	1,	1,	1,

    0,	0,	-1,	-1,	0,	0,	1,	1,
    1,	-1,	0,	0,	0,	0,	1,	1,
    0,	0,	1,	1,	0,	0,	1,	1,
    -1,	1,	0,	0,	0,	0,	1,	1,

    1,	-1,	-1,	-1,	1,	-1,	1,	1,
    0,	0,	0,	0,	1,	-1,	1,	1,
    -1,	1,	1,	1,	1,	-1,	1,	1,
    0,	0,	0,	0,	1,	-1,	1,	1,

    0,	0,	-1,	-1,	0,	0,	1,	1,
    -1,	1,	0,	0,	0,	0,	1,	1,
    0,	0,	1,	1,	0,	0,	1,	1,
    1,	-1,	0,	0,	0,	0,	1,	1,

    0,	1,	0,	-1,	0,	1,	0,	1,
    1,	0,	1,	0,	0,	1,	0,	1,
    0,	-1,	0,	1,	0,	1,	0,	1,
    -1,	0,	-1,	0,	0,	1,	0,	1,

    1,	0,	0,	-1,	1,	0,	0,	1,
    0,	-1,	1,	0,	1,	0,	0,	1,
    -1,	0,	0,	1,	1,	0,	0,	1,
    0,	1,	-1,	0,	1,	0,	0,	1,

    0,	-1,	0,	-1,	0,	-1,	0,	1,
    -1,	0,	1,	0,	0,	-1,	0,	1,
    0,	1,	0,	1,	0,	-1,	0,	1,
    1,	0,	-1,	0,	0,	-1,	0,	1,

    -1,	0,	0,	-1,	-1,	0,	0,	1,
    0,	1,	1,	0,	-1,	0,	0,	1,
    1,	0,	0,	1,	-1,	0,	0,	1,
    0,	-1,	-1,	0,	-1,	0,	0,	1 
};

 hs_int16_t  asFullRateCckSeqQ_g[64*8] ={

    0,	0,	0,	0,	0,	0,	0,	0,
    1,	1,	1,	-1,	0,	0,	0,	0,
    0,	0,	0,	0,	0,	0,	0,	0,
    -1,	-1,	-1,	1,	0,	0,	0,	0,

    1,	1,	0,	0,	1,	1,	0,	0,
    0,	0,	1,	-1,	1,	1,	0,	0,
    -1,	-1,	0,	0,	1,	1,	0,	0,
    0,	0,	-1,	1,	1,	1,	0,	0,

    0,	0,	0,	0,	0,	0,	0,	0,
    -1,	-1,	1,	-1,	0,	0,	0,	0,
    0,	0,	0,	0,	0,	0,	0,	0,
    1,	1,	-1,	1,	0,	0,	0,	0,

    -1,	-1,	0,	0,	-1,	-1,	0,	0,
    0,	0,	1,	-1,	-1,	-1,	0,	0,
    1,	1,	0,	0,	-1,	-1,	0,	0,
    0,	0,	-1,	1,	-1,	-1,	0,	0,

    1,	0,	1,	0,	1,	0,	-1,	0,
    0,	1,	0,	-1,	1,	0,	-1,	0,
    -1,	0,	-1,	0,	1,	0,	-1,	0,
    0,	-1,	0,	1,	1,	0,	-1,	0,

    0,	1,	1,	0,	0,	1,	-1,	0,
    -1,	0,	0,	-1,	0,	1,	-1,	0,
    0,	-1,	-1,	0,	0,	1,	-1,	0,
    1,	0,	0,	1,	0,	1,	-1,	0,

    -1,	0,	1,	0,	-1,	0,	-1,	0,
    0,	-1,	0,	-1,	-1,	0,	-1,	0,
    1,	0,	-1,	0,	-1,	0,	-1,	0,
    0,	1,	0,	1,	-1,	0,	-1,	0,

    0,	-1,	1,	0,	0,	-1,	-1,	0,
    1,	0,	0,	-1,	0,	-1,	-1,	0,
    0,	1,	-1,	0,	0,	-1,	-1,	0,
    -1,	0,	0,	1,	0,	-1,	-1,	0,

    0,	0,	0,	0,	0,	0,	0,	0,
    -1,	1,	-1,	-1,	0,	0,	0,	0,
    0,	0,	0,	0,	0,	0,	0,	0,
    1,	-1,	1,	1,	0,	0,	0,	0,

    -1,	1,	0,	0,	-1,	1,	0,	0,
    0,	0,	-1,	-1,	-1,	1,	0,	0,
    1,	-1,	0,	0,	-1,	1,	0,	0,
    0,	0,	1,	1,	-1,	1,	0,	0,

    0,	0,	0,	0,	0,	0,	0,	0,
    1,	-1,	-1,	-1,	0,	0,	0,	0,
    0,	0,	0,	0,	0,	0,	0,	0,
    -1,	1,	1,	1,	0,	0,	0,	0,

    1,	-1,	0,	0,	1,	-1,	0,	0,
    0,	0,	-1,	-1,	1,	-1,	0,	0,
    -1,	1,	0,	0,	1,	-1,	0,	0,
    0,	0,	1,	1,	1,	-1,	0,	0,

    -1,	0,	-1,	0,	-1,	0,	1,	0,
    0,	1,	0,	-1,	-1,	0,	1,	0,
    1,	0,	1,	0,	-1,	0,	1,	0,
    0,	-1,	0,	1,	-1,	0,	1,	0,

    0,	1,	-1,	0,	0,	1,	1,	0,
    1,	0,	0,	-1,	0,	1,	1,	0,
    0,	-1,	1,	0,	0,	1,	1,	0,
    -1,	0,	0,	1,	0,	1,	1,	0,

    1,	0,	-1,	0,	1,	0,	1,	0,
    0,	-1,	0,	-1,	1,	0,	1,	0,
    -1,	0,	1,	0,	1,	0,	1,	0,
    0,	1,	0,	1,	1,	0,	1,	0,

    0,	-1,	-1,	0,	0,	-1,	1,	0,
    -1,	0,	0,	-1,	0,	-1,	1,	0,
    0,	1,	1,	0,	0,	-1,	1,	0,
    1,	0,	0,	1,	0,	-1,	1,	0
} ;

hs_int16_t asUpSampBarkerSeq_g[32] = 
{
    1, 0, -1, 0, 1, 0, 1, 0, -1, 0, 1, 0,
    1, 0,  1,  0, -1, 0, -1, 0, -1, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0
};

 hs_uint8_t  u8_byte_translate_array_g[4] = {0,2,1,3};
 
 /** Dont need 64, just 32 **/
hs_int16_t  HalfRateCckSeq_g[64]=
{
    /** I **/
    0, 1, 0,-1,0,1,0,1,
    0, -1, 0, 1, 0, 1, 0, 1,
    0, 1, 0,-1, 0, 1, 0, 1,  
    0, -1, 0, 1, 0, 1, 0, 1,
    
    /** Q **/
    1, 0, 1, 0, 1, 0,-1,0,
    -1,0,-1, 0, 1, 0,-1, 0,	
    -1,0,-1, 0, -1,0, 1, 0,
    1, 0,1, 0, -1, 0, 1, 0, 
};

hs_uint8_t ucStateTable1Bit_g[128] = 
{
    0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,
    0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,
    0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,
    0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,
    0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,
    0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,
    0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0,
    0,1,0,1,0,1,0,1,1,0,1,0,1,0,1,0
};

 hs_uint8_t ucStateTable4Bit_g[128]=
{
    0,1,2,3,4,5,6,7,
    9,8,11,10,13,12,15,14,
    2,3,0,1,6,7,4,5,
    11,10,9,8,15,14,13,12,
    4,5,6,7,0,1,2,3,
    13,12,15,14,9,8,11,10,
    6,7,4,5,2,3,0,1,
    15,14,13,12,11,10,9,8,
    8,9,10,11,12,13,14,15,
    1,0,3,2,5,4,7,6,
    10,11,8,9,14,15,12,13,
    3,2,1,0,7,6,5,4,
    12,13,14,15,8,9,10,11,
    5,4,7,6,1,0,3,2,
    14,15,12,13,10,11,8,9,
    7,6,5,4,3,2,1,0
};
   
 hs_uint8_t ucStateTable2Bit_g[128]={
    0,1,2,3,0,1,2,3,
    1,0,3,2,1,0,3,2,
    2,3,0,1,2,3,0,1,
    3,2,1,0,3,2,1,0,
    0,1,2,3,0,1,2,3,
    1,0,3,2,1,0,3,2,
    2,3,0,1,2,3,0,1,
    3,2,1,0,3,2,1,0,
    0,1,2,3,0,1,2,3,
    1,0,3,2,1,0,3,2,
    2,3,0,1,2,3,0,1,
    3,2,1,0,3,2,1,0,
    0,1,2,3,0,1,2,3,
    1,0,3,2,1,0,3,2,
    2,3,0,1,2,3,0,1,
    3,2,1,0,3,2,1,0
};

hs_uint32_t aiCrc32Table_4bit_g[16]=
{
    0x0,0x1db71064,0x3b6e20c8,0x26d930ac,
    0x76dc4190,0x6b6b51f4,0x4db26158, 0x5005713c,
    0xedb88320,0xf00f9344,0xd6d6a3e8,0xcb61b38c,
    0x9b64c2b0,0x86d3d2d4,0xa00ae278,0xbdbdf21c
};
  
hs_uint16_t asCrc16Table_1bit_g[2]=
{
    0x0, 0x8408
};
  
 hs_uint32_t aiCrc32Table_1bit_g[2] = { 
    0,0xedb88320
};
  
 hs_uint32_t aiCrc32Table_2bit_g[4] = { 
    0x0, 0x76dc4190, 0xedb88320, 0x9b64c2b0
};

/* 11 mbps tables*/
 hs_uint32_t aiCrc32Table_g[256] = {0x0, 
0x77073096, 0xee0e612c, 0x990951ba, 0x76dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0xedb8832, 
0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x9b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 
0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 
0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 
0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 
0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 
0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 
0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 
0x1db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x6b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 
0xf00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x86d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 
0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 
0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 
0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 
0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 
0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 
0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 
0x9abfb3b6, 0x3b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x4db2615, 0x73dc1683, 0xe3630b12, 
0x94643b84, 0xd6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0xa00ae27, 0x7d079eb1, 0xf00f9344, 
0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 
0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 
0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 
0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 
0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 
0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 
0xec63f226, 0x756aa39c, 0x26d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x5005713, 0x95bf4a82, 
0xe2b87a14, 0x7bb12bae, 0xcb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0xbdbdf21, 0x86d3d2d4, 
0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, 
0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 
0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 
0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 
0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 
0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d}; 

 hs_uint8_t ucTranslate_array_g[64] = {
  
   0, 32, 16, 48,  8, 40, 24, 56, 
   4, 36, 20, 52, 12, 44, 28, 60, 
   2, 34, 18, 50, 10, 42, 26, 58, 
   6, 38, 22, 54, 14, 46, 30, 62, 
   1, 33, 17, 49,  9, 41, 25, 57, 
   5, 37, 21, 53, 13, 45, 29, 61, 
   3, 35, 19, 51, 11, 43, 27, 59, 
   7, 39, 23, 55, 15, 47, 31, 63
};
  
 hs_uint8_t ucMapTable_g[64]={ 
  0,   4,   8,  12,  16,  20,  24,  28,
  32,  36,  40, 44,  48,  52,  56,  60,
  1,   5,   9,  13,  17,  21,  25,  29,
  33,  37,  41, 45,  49,  53,  57,  61,
  2,   6,   10, 14,  18,  22,  26,  30,
  34,  38,  42, 46,  50,  54,  58,  62,
  3,   7,   11, 15,  19,  23,  27,  31,
  35,  39,  43, 47,  51,  55,  59,  63};

  
 /* Fixed point Tan table*/
 const hs_uint8_t OneByXFormat_g[256]=
{
0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7

};

 const hs_uint16_t OneByXTbl_g[256] = {
0,65535,65535,43691,65535,52429,43691,37449,65535,58254,52429,47663,43691,40330,37449,34953,
65535,61681,58254,55188,52429,49932,47663,45590,43691,41943,40330,38836,37449,36158,34953,33825,
65535,63550,61681,59919,58254,56680,55188,53773,52429,51150,49932,48771,47663,46603,45590,44620,
43691,42799,41943,41121,40330,39569,38836,38130,37449,36792,36158,35545,34953,34380,33825,33288,
65535,64528,63550,62602,61681,60787,59919,59075,58254,57456,56680,55924,55188,54471,53773,53092,
52429,51782,51150,50534,49932,49345,48771,48210,47663,47127,46603,46091,45590,45100,44620,44151,
43691,43240,42799,42367,41943,41528,41121,40721,40330,39946,39569,39199,38836,38480,38130,37787,
37449,37118,36792,36472,36158,35849,35545,35246,34953,34664,34380,34100,33825,33554,33288,33026,
65535,65028,64528,64035,63550,63072,62602,62138,61681,61231,60787,60350,59919,59494,59075,58662,
58254,57852,57456,57065,56680,56299,55924,55554,55188,54828,54471,54120,53773,53431,53092,52759,
52429,52103,51782,51464,51150,50840,50534,50231,49932,49637,49345,49056,48771,48489,48210,47935,
47663,47393,47127,46864,46603,46346,46091,45839,45590,45344,45100,44859,44620,44384,44151,43919,
43691,43464,43240,43019,42799,42582,42367,42154,41943,41734,41528,41323,41121,40920,40721,40525,
40330,40137,39946,39756,39569,39383,39199,39017,38836,38657,38480,38304,38130,37958,37787,37617,
37449,37283,37118,36954,36792,36631,36472,36314,36158,36003,35849,35696,35545,35395,35246,35099,
34953,34808,34664,34521,34380,34239,34100,33962,33825,33689,33554,33421,33288,33157,33026,32897

};

/* This table is having values of arctan(x). 
 * x is ranging from 0 --> 2 in steps of 1/64 
 * Format is U(1,15) */
 const hs_uint16_t usAtanTbl_g[256] = {
 0,512,1024,1535,2045,2555,3063,3570,
  4075,4578,5079,5578,6073,6567,7057,7544,
  8027,8508,8984,9456,9925,10389,10849,11305,
  11756,12203,12645,13082,13514,13941,14363,14781,
  15193,15600,16002,16398,16790,17176,17557,17933,
  18304,18670,19030,19386,19736,20081,20421,20756,
  21086,21411,21732,22047,22358,22664,22966,23262,
  23555,23842,24126,24405,24679,24950,25216,25478,
  25736,25990,26240,26486,26729,26967,27202,27433,
  27661,27885,28106,28324,28538,28749,28956,29161,
  29362,29560,29756,29948,30137,30324,30508,30689,
  30867,31043,31217,31387,31555,31721,31885,32046,
  32204,32361,32515,32667,32817,32964,33110,33254,
  33395,33535,33673,33808,33942,34075,34205,34334,
  34460,34586,34709,34831,34951,35070,35187,35303,
  35417,35530,35641,35751,35859,35966,36072,36176,
  36279,36381,36481,36581,36679,36775,36871,36966,
  37059,37151,37243,37333,37422,37510,37597,37683,
  37767,37851,37934,38017,38098,38178,38257,38336,
  38413,38490,38566,38641,38715,38788,38861,38932,
  39003,39074,39143,39212,39280,39347,39414,39480,
  39545,39610,39673,39737,39799,39861,39923,39983,
  40043,40103,40162,40220,40278,40335,40392,40448,
  40503,40558,40613,40667,40720,40773,40825,40877,
  40929,40980,41030,41080,41130,41179,41228,41276,
  41324,41371,41418,41464,41510,41556,41601,41646,
  41691,41735,41778,41822,41865,41907,41950,41991,
  42033,42074,42115,42155,42195,42235,42275,42314,
  42353,42391,42429,42467,42505,42542,42579,42615,
  42652,42688,42724,42759,42794,42829,42864,42898,
  42932,42966,43000,43033,43066,43099,43132,43164,
  43196,43228,43260,43291,43322,43353,43384,43414
}; 

/* This table is having values of slopes of Atan 
 * for the same values of x for which arctan values 
 * are stored in above table. Format is U(0,16) */
 const hs_uint16_t usAtanSlope_g[256] = {
65535,65520,65472,65392,65281,65138,64965,64761,
64528,64265,63974,63656,63310,62939,62543,62123,
61681,61217,60732,60228,59705,59166,58610,58040,
57456,56860,56252,55634,55007,54372,53730,53082,
52429,51772,51111,50448,49784,49119,48454,47790,
47127,46466,45808,45153,44502,43855,43212,42575,
41943,41317,40697,40083,39476,38876,38282,37696,
37118,36547,35983,35428,34880,34340,33808,33284,
32768,32260,31760,31268,30784,30308,29839,29379,
28926,28481,28044,27614,27192,26777,26369,25968,
25575,25189,24809,24437,24071,23711,23358,23012,
22672,22338,22010,21688,21372,21062,20757,20458,
20165,19877,19594,19316,19043,18776,18513,18255,
18001,17752,17508,17268,17033,16801,16574,16351,
16132,15917,15705,15498,15294,15093,14897,14703,
14513,14326,14143,13963,13786,13612,13441,13272,
13107,12945,12785,12628,12474,12322,12173,12026,
11882,11740,11600,11463,11328,11196,11065,10936,
10810,10686,10563,10443,10324,10208,10093,9980,
9869,9760,9652,9546,9441,9339,9237,9138,
9039,8943,8848,8754,8661,8570,8481,8393,
8306,8220,8135,8052,7970,7889,7810,7731,
7654,7578,7502,7428,7355,7283,7212,7142,
7073,7005,6938,6872,6806,6742,6678,6615,
6554,6493,6432,6373,6314,6257,6199,6143,
6088,6033,5979,5925,5872,5820,5769,5718,
5668,5619,5570,5521,5474,5427,5380,5334,
5289,5244,5200,5157,5113,5071,5029,4987,
4946,4906,4865,4826,4787,4748,4710,4672,
4635,4598,4561,4525,4489,4454,4419,4385,
4351,4317,4284,4251,4219,4186,4155,4123,
4092,4061,4031,4001,3971,3941,3912,3884
};


 const hs_int16_t ssCosineTable_g[513] = {

32767,  32766,  32758,  32746,  32729,  32706,  32679,
32647,  32610,  32568,  32522,  32470,  32413,  32352,
32286,  32214,  32138,  32058,  31972,  31881,  31786,
31686,  31581,  31471,  31357,  31238,  31114,  30986,
30853,  30715,  30572,  30425,  30274,  30118,  29957,
29792,  29622,  29448,  29269,  29086,  28899,  28707,
28511,  28311,  28106,  27897,  27684,  27467,  27246,
27020,  26791,  26557,  26320,  26078,  25833,  25583,
25330,  25073,  24812,  24548,  24279,  24008,  23732,
23453,  23170,  22884,  22595,  22302,  22006,  21706,
21403,  21097,  20788,  20475,  20160,  19841,  19520,
19195,  18868,  18538,  18205,  17869,  17531,  17190,
16846,  16500,  16151,  15800,  15447,  15091,  14733,
14373,  14010,  13646,  13279,  12910,  12540,  12167,
11793,  11417,  11039,  10660,  10279,    9896,   9512,
 9127,    8740,   8351,   7962,   7571,   7180,   6787,
 6393,   5998,   5602,    5205,   4808,   4410,   4011,
 3612,   3212,   2811,   2411,   2009,   1608,   1206,
  804,    402,      0,   -402,    -804,  -1206,  -1608,
-2009,  -2411,  -2811,  -3212,  -3612,  -4011,  -4410,
-4808,  -5205,  -5602,  -5998,  -6393,  -6787,  -7180,
-7571,  -7962,  -8351,  -8740,  -9127,  -9512,  -9896,
-10279,  -10660,  -11039,  -11417,  -11793,  -12167,  -12540,
-12910,  -13279,  -13646,  -14010,  -14373,  -14733,  -15091,
-15447,  -15800,  -16151,  -16500,  -16846,  -17190,  -17531,
-17869,  -18205,  -18538,  -18868,  -19195,  -19520,  -19841,
-20160,  -20475,  -20788,  -21097,  -21403,  -21706,  -22006,
-22302,  -22595,  -22884,  -23170,  -23453,  -23732,  -24008,
-24279,  -24548,  -24812,  -25073,  -25330,  -25583,  -25833,
-26078,  -26320,  -26557,  -26791,  -27020,  -27246,  -27467,
-27684,  -27897,  -28106,  -28311,  -28511,  -28707,  -28899,
-29086,  -29269,  -29448,  -29622,  -29792,  -29957,  -30118,
-30274,  -30425,  -30572,  -30715,  -30853,  -30986,  -31114,
-31238,  -31357,  -31471,  -31581,  -31686,  -31786,  -31881,
-31972,  -32058,  -32138,  -32214,  -32286,  -32352,  -32413,
-32470,  -32522,  -32568,  -32610,  -32647,  -32679,  -32706,
-32729,  -32746,  -32758,  -32766,  -32767,  -32766,  -32758,
-32746,  -32729,  -32706,  -32679,  -32647,  -32610,  -32568,
-32522,  -32470,  -32413,  -32352,  -32286,  -32214,  -32138,
-32058,  -31972,  -31881,  -31786,  -31686,  -31581,  -31471,
-31357,  -31238,  -31114,  -30986,  -30853,  -30715,  -30572,
-30425,  -30274,  -30118,  -29957,  -29792,  -29622,  -29448,
-29269,  -29086,  -28899,  -28707,  -28511,  -28311,  -28106,
-27897,  -27684,  -27467,  -27246,  -27020,  -26791,  -26557,
-26320,  -26078,  -25833,  -25583,  -25330,  -25073,  -24812,
-24548,  -24279,  -24008,  -23732,  -23453,  -23170,  -22884,
-22595,  -22302,  -22006,  -21706,  -21403,  -21097,  -20788,
-20475,  -20160,  -19841,  -19520,  -19195,  -18868,  -18538,
-18205,  -17869,  -17531,  -17190,  -16846,  -16500,  -16151,
-15800,  -15447,  -15091,  -14733,  -14373,  -14010,  -13646,
-13279,  -12910,  -12540,  -12167,  -11793,  -11417,  -11039,
-10660,  -10279,  -9896,  -9512,  -9127,  -8740,  -8351,
-7962,  -7571,  -7180,  -6787,  -6393,  -5998,  -5602,
-5205,  -4808,  -4410,  -4011,  -3612,  -3212,  -2811,
-2411,  -2009,  -1608,  -1206,  -804,  -402,  0,  402,  804,
1206,  1608,  2009,  2411,  2811,  3212,  3612,  4011,  4410,  4808,  5205,
  5602,  5998,  6393,  6787,  7180,  7571,  7962,  8351,  8740,  9127,  
9512,  9896,  10279,  10660,  11039,  11417,  11793,  12167,
  12540,  12910,  13279,  13646,  14010,  14373,  14733,
  15091,  15447,  15800,  16151,  16500,  16846,  17190,
  17531,  17869,  18205,  18538,  18868,  19195,  19520,
  19841,  20160,  20475,  20788,  21097,  21403,  21706,
  22006,  22302,  22595,  22884,  23170,  23453,  23732,
  24008,  24279,  24548,  24812,  25073,  25330,  25583,
  25833,  26078,  26320,  26557,  26791,  27020,  27246,
  27467,  27684,  27897,  28106,  28311,  28511,  28707,
  28899,  29086,  29269,  29448,  29622,  29792,  29957,
  30118,  30274,  30425,  30572,  30715,  30853,  30986,
  31114,  31238,  31357,  31471,  31581,  31686,  31786,
  31881,  31972,  32058,  32138,  32214,  32286,  32352,
  32413,  32470,  32522,  32568,  32610,  32647,  32679,
  32706,  32729,  32746,  32758,  32766, 32767
};

/*
 * Note: If you want to include the hashdefines in declaring the array
 * size then, please include the corresponding header file
 */
/*format ssSineTable A(0,15)*/
 const hs_int16_t ssSineTable_g[513] = {

0,  402,  804,  1206,  1608,  2009,  2411,  2811,  3212,  3612,  4011,
  4410,  4808,  5205,  5602,  5998,  6393,  6787,  7180,  7571,  7962,
  8351,  8740,  9127,  9512,  9896,  10279,  10660,  11039,
  11417,  11793,  12167,  12540,  12910,  13279,
  13646,  14010,  14373,  14733,  15091,  15447,
  15800,  16151,  16500,  16846,  17190,  17531,
17869,  18205,  18538,  18868,  19195,  19520,
  19841,  20160,  20475,  20788,  21097,  21403,
  21706,  22006,  22302,  22595,  22884,  23170,
  23453,  23732,  24008,  24279,  24548,  24812,
  25073,  25330,  25583,  25833,  26078,  26320,
  26557,  26791,  27020,  27246,  27467,  27684,
  27897,  28106,  28311,  28511,  28707,  28899,
  29086,  29269,  29448,  29622,  29792,  29957,
  30118,  30274,  30425,  30572,  30715,  30853,
  30986,  31114,  31238,  31357,  31471,  31581,
  31686,  31786,  31881,  31972,  32058,  32138,
  32214,  32286,  32352,  32413,  32470,  32522,
  32568,  32610,  32647,  32679,  32706,  32729,
  32746,  32758,  32766,  32767,  32766,  32758,
32746,  32729,  32706,  32679,  32647,  32610,
  32568,  32522,  32470,  32413,  32352,  32286,
  32214,  32138,  32058,  31972,  31881,  31786,
  31686,  31581,  31471,  31357,  31238,  31114,
  30986,  30853,  30715,  30572,  30425,  30274,
  30118,  29957,  29792,  29622,  29448,  29269,
  29086,  28899,  28707,  28511,  28311,  28106,
  27897,  27684,  27467,  27246,  27020,  26791,
  26557,  26320,  26078,  25833,  25583,  25330,
  25073,  24812,  24548,  24279,  24008,  23732,
  23453,  23170,  22884,  22595,  22302,  22006,
  21706,  21403,  21097,  20788,  20475,  20160,
  19841,  19520,  19195,  18868,  18538,  18205,
  17869,  17531,  17190,  16846,  16500,  16151,
  15800,  15447,  15091,  14733,  14373,  14010,
  13646,  13279,  12910,  12540,  12167,  11793,
  11417,  11039,  10660,  10279,  9896,  9512,  9127,
  8740,  8351,  7962,  7571,  7180,  6787,  6393,  5998,  5602,
  5205,  4808,  4410,  4011,  3612,  3212,  2811,  2411,  2009,
  1608,  1206,  804,  402,  0,  -402,  -804,  -1206,  -1608,
  -2009,  -2411,  -2811,  -3212,  -3612,  -4011,
  -4410,  -4808,  -5205,  -5602,  -5998,  -6393,
  -6787,  -7180,  -7571,  -7962,  -8351,  -8740,
  -9127,  -9512,  -9896,  -10279,  -10660,  -11039,
  -11417,  -11793,  -12167,  -12540,  -12910,  -13279,
  -13646,  -14010,  -14373,  -14733,  -15091,  -15447,
  -15800,  -16151,  -16500,  -16846,  -17190,  -17531,
  -17869,  -18205,  -18538,  -18868,  -19195,  -19520,
  -19841,  -20160,  -20475,  -20788,  -21097,  -21403,
  -21706,  -22006,  -22302,  -22595,  -22884,  -23170,
  -23453,  -23732,  -24008,  -24279,  -24548,  -24812,
  -25073,  -25330,  -25583,  -25833,  -26078,  -26320,
  -26557,  -26791,  -27020,  -27246,  -27467,  -27684,
  -27897,  -28106,  -28311,  -28511,  -28707,  -28899,
  -29086,  -29269,  -29448,  -29622,  -29792,  -29957,
  -30118,  -30274,  -30425,  -30572,  -30715,  -30853,
  -30986,  -31114,  -31238,  -31357,  -31471,  -31581,
  -31686,  -31786,  -31881,  -31972,  -32058,  -32138,
  -32214,  -32286,  -32352,  -32413,  -32470,  -32522,
  -32568,  -32610,  -32647,  -32679,  -32706,  -32729,
  -32746,  -32758,  -32766,  -32767,  -32766,  -32758,
  -32746,  -32729,  -32706,  -32679,  -32647,  -32610,
  -32568,  -32522,  -32470,  -32413,  -32352,  -32286,
  -32214,  -32138,  -32058,  -31972,  -31881,  -31786,
  -31686,  -31581,  -31471,  -31357,  -31238,  -31114,
  -30986,  -30853,  -30715,  -30572,  -30425,  -30274,
  -30118,  -29957,  -29792,  -29622,  -29448,  -29269,
  -29086,  -28899,  -28707,  -28511,  -28311,  -28106,
  -27897,  -27684,  -27467,  -27246,  -27020,  -26791,
  -26557,  -26320,  -26078,  -25833,  -25583,  -25330,
  -25073,  -24812,  -24548,  -24279,  -24008,  -23732,
  -23453,  -23170,  -22884,  -22595,  -22302,  -22006,
  -21706,  -21403,  -21097,  -20788,  -20475,  -20160,
  -19841,  -19520,  -19195,  -18868,  -18538,  -18205,
  -17869,  -17531,  -17190,  -16846,  -16500,  -16151,
  -15800,  -15447,  -15091,  -14733,  -14373,  -14010,
  -13646,  -13279,  -12910,  -12540,  -12167,  -11793,
  -11417,  -11039,  -10660,  -10279,  -9896,  -9512,
  -9127,  -8740,  -8351,  -7962,  -7571,  -7180,
  -6787,  -6393,  -5998,  -5602,  -5205,  -4808,
  -4410,  -4011,  -3612,  -3212,  -2811,  -2411,
  -2009,  -1608,  -1206,  -804,  -402, 0
};  
#endif
